package cn.edu.hit.kg.data;

import java.util.Map;

/**
 * Created by Wang on 2018/11/13.
 */
public interface Node {
    long id();

    Map<String, Object> asMap();

    Iterable<String> labels();

    boolean hasLabel(String label);

    Object get(String key);

    default Object getOrDefault(String key, Object defaultValue) {
        Object v = get(key);
        if (v == null)
            return defaultValue;
        return v;
    }
}
